package com.zgjkhis.modules.system.service.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zgjkhis.modules.system.domain.InfoSalesDate;
import com.zgjkhis.modules.system.domain.vo.InfoSaleVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author yzq
 * @Description 供应商
 * @Date 2021/6/23 9:48
 * @Param
 * @return
 **/
@Repository
public interface InfoSalesDateMapper extends BaseMapper<InfoSalesDate> {

    @Select("<script>select * from info_sales_date t \n" +
            "where 1=1 and t.pharmacy_id=#{pharmacyId}  and t.is_del=0 \n" +
            " and t.date BETWEEN #{startDate} and #{endDate}\n" +
            "</script>")

    List<InfoSaleVo> findAllByDate(@Param("pharmacyId") String pharmacyId, @Param("startDate") String startDate, @Param("endDate") String endDate);


}
